package io.renren.modules.app.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import io.renren.modules.app.dao.GoodCouponDao;
import io.renren.modules.app.entity.GoodCouponEntity;
import io.renren.modules.app.service.GoodCouponService;



@Service("goodCouponService")
public class GoodCouponServiceImpl implements GoodCouponService {
	@Autowired
	private GoodCouponDao goodCouponDao;
	
	@Override
	public GoodCouponEntity queryObject(Long id){
		return goodCouponDao.queryObject(id);
	}
	
	@Override
	public List<GoodCouponEntity> queryList(Map<String, Object> map){
		return goodCouponDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return goodCouponDao.queryTotal(map);
	}
	
	@Override
	public void save(GoodCouponEntity goodCoupon){
		goodCouponDao.save(goodCoupon);
	}
	
	@Override
	public void update(GoodCouponEntity goodCoupon){
		goodCouponDao.update(goodCoupon);
	}
	
	@Override
	public void delete(Long id){
		goodCouponDao.delete(id);
	}
	
	@Override
	public void deleteBatch(Long[] ids){
		goodCouponDao.deleteBatch(ids);
	}

	@Override
	public void saveList(List<GoodCouponEntity> goodCoupons) {
		for (GoodCouponEntity goodCoupon : goodCoupons) {
			save(goodCoupon);
		}
	}
	
}
